/* 主页index.html样式表 */

/* 顶部导航条的容器 */
.topbar-wrapper {
  /* 设置宽度为全屏 */
  width: 100%;
  /* 设置行高及垂直居中 */
  height: 40px;
  line-height: 40px;
  background-color: #333;
}
/* 设置超链接的颜色 */
.topbar a {
  font-size: 12px;
  color: #b0b0b0;
  display: block;
}
/* 设置鼠标移入时字体变颜色 */
.topbar a:hover {
  color: #fff;
}
.topbar .line {
  color: #424242;
  font-size: 12px;
  margin: 0 8px;
  /* margin-top: -2px; */
}
/* 设置左侧导航栏 */
.service,
.topbar li {
  float: left;
}
.app {
  position: relative;
}
/* 设置app下的小三角 */
.app-wrapper:hover > .app::after {
  content: "";
  position: absolute;
  /* display: none; */
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-top: none;
  border-bottom-color: #fff;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
}
.app:hover .qrcode,
.app:hover::after {
  display: block;
  height: 148px;
}
/* .app-wrapper:hover > .app .qrcode {
  display: block;
} */
/* 设置二维码下拉菜单 */
.app .qrcode {
  /* display: none; */
  position: absolute;
  left: -36px;
  width: 124px;
  /* height: 148px; */
  height: 0;
  overflow: hidden;
  line-height: 1;
  text-align: center;
  background-color: #fff;
  /* 增减阴影效果 */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);

  /* transition属性用于设置过度效果，即二维码弹出层可以慢慢弹出 */
  transition: height 500ms;
  z-index: 9999;
}
/* 设置二维码图片 */
.app .qrcode img {
  width: 90px;
  margin: 17px;
  margin-bottom: 10px;
}
/* 设置二维码下的文字 */
.app .qrcode span {
  font-size: 14px;
  color: #333;
}
.shop-car,
.user-info {
  float: right;
}
/* 设置购物车样式 */
.shop-car {
  margin-left: 26px;
}
.shop-car a {
  width: 120px;
  background-color: #424242;
  text-align: center;
}
.shop-car:hover a {
  background-color: #fff;
  color: #ff6700;
}
.shop-car i {
  margin-right: 2px;
}
.shopping {
  position: relative;
}
.shopping:hover .commodity {
  display: block;
  height: 100px;
}
.shopping .commodity {
  /* display: none; */
  position: absolute;
  width: 316px;
  /* height: 100px; */
  height: 0;
  left: -196px;
  overflow: hidden;
  text-align: center;
  background-color: #fff;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.3);
  transition: height 500ms;
  z-index: 9999;
}
.shopping .commodity span {
  color: #424242;
  font-size: 14px/1.5 Helvetica Neue, Helvetica, Arial, Microsoft Yahei,
    Hiragino Sans GB, Heiti SC, WenQuanYi Micro Hei, sans-serif;
  display: block;
  margin: 0 20px 20px;
  padding: 20px 0;
}
/* 设置中间的header */
.header-wrapper {
  /* background-color: red; */
  position: relative;
}
.header {
  height: 100px;
  /* background-color: #bfa; */
}
.header .logo {
  float: left;
  margin-top: 22px;
  width: 55px;
  height: 55px;
  position: relative;
  overflow: hidden;
  /* 首行缩进,用于隐藏logo中图片 yo*/
  text-indent: -9999px;
}
.header .logo a {
  /* display: block; */
  position: absolute;
  width: 55px;
  height: 55px;
  left: 0;
  background-color: #ff6700;
  background-image: url(../img/mi-logo.png);
  background-position: center;
  transition: left 300ms;
}
/* 设置home图标 */
.header .logo .home {
  left: -55px;
  background-image: url(../img/mi-home.png);
}
/* 设置鼠标移入动画 */
.header .logo:hover .mi {
  left: 55px;
}
.header .logo:hover .home {
  left: 0;
}
/* 设置中间导航条 */
.header .nav-wrapper {
  float: left;
  margin-left: 7px;
}
/* 设置导航条 */
.header .nav {
  /* width: 792px; */
  /* background-color: #bfa; */
  height: 100px;
  line-height: 100px;
  padding-left: 58px;
}
/* 设置导航条中的链接 */
.nav > li {
  float: left;
}
.all-goods-wrapper {
  position: relative;
}
/* 设置左侧导航条的样式 */
.left-menu {
  width: 234px;
  height: 420px;
  padding: 20px 0;
  background-color: rgba(0, 0, 0, 0.6);
  position: absolute;
  z-index: 999;
  left: -120px;
  /* 设置字体间的行高 */
  line-height: 1;
}
ul.left-menu li a {
  display: block;
  height: 42px;
  line-height: 42px;
  color: white;
  margin-right: 0;
  padding: 0 30px;
  font-size: 14px;
}
ul.left-menu li a:hover {
  color: white;
  background-color: #ff6700;
}
.left-menu a i {
  float: right;
  line-height: 42px;
  font-size: 20px;
}
.nav-wrapper li a {
  /* 转换成块元素 */
  display: block;
  font-size: 16px;
  margin-right: 20px;
}
.nav-wrapper li a:hover {
  color: #ff6700;
}
/* 隐藏全部商品 */
.all-goods {
  /* 用于元素隐藏，但该元素还是占据位置，而display:none;式隐藏不会占据位置 */

  visibility: hidden;
}

/* 设置中间弹出层 */
.nav .goods-info {
  height: 0;
  overflow: hidden;
  width: 100%;
  background-color: #fff;
  /* border-top: 1px solid rgb(224, 224, 224);
  box-shadow: 0 3px 3px  rgba(0, 0, 0, .2); */
  position: absolute;
  top: 100px;
  left: 0;
  transition: height 300ms;
  z-index: 9999;
}
/* .nav li:not(:first-of-type):not(:nth-child(9)):not(:nth-child(10)):hover ~ .goods-info,否定选择器，用于否定第几个元素是否弹出 */
.nav .show-goods:hover ~ .goods-info,
.goods-info:hover {
  height: 228px;
  border-top: 1px solid rgb(224, 224, 224);
  box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
}
/* 搜索框 */
.search-wrapper {
  width: 296px;
  height: 50px;
  float: right;
  /* background-color: #bfa; */
  margin-top: 25px;
}
.search-wrapper .search-inp {
  box-sizing: border-box;
  width: 244px;
  border: none;
  float: left;
  padding: 0 10px;
  height: 50px;
  font-size: 16px;
  border: 1px solid rgb(224, 224, 224);
  outline: none;
}
/* 设置input获取焦点后的样式,就是鼠标移入后轮廓线发生改变 */
.search-wrapper .search-inp:focus,
.search-wrapper .search-inp:focus + button {
  border-color: #ff6700;
}
.search-wrapper .search-btn {
  float: left;
  height: 50px;
  width: 52px;
  padding: 0;
  border: none;
  background-color: #fff;
  color: #616161;
  font-size: 16px;
  border: 1px solid rgb(224, 224, 224);
  border-left: none;
}
.search-wrapper .search-btn:hover {
  background-color: #ff6700;
  color: white;
  border: none;
}
/* 设置banner */
.banner {
  position: relative;
  height: 460px;
}
.banner .img-list li {
  position: absolute;
}
.banner img {
  width: 100%;
  vertical-align: top;
}

.pointer {
  position: absolute;
  bottom: 22px;
  right: 35px;
  /* z-index: 9; */
}
.pointer a {
  float: left;
  width: 6px;
  height: 6px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.4);
  margin-left: 6px;
}
.pointer a.active,
.pointer a:hover {
  border-color: rgba(0, 0, 0, 0.4);
  background-color: rgba(255, 255, 255, 0.4);
}

/* 设置轮播图两侧的箭头 */
.prev-next a {
  width: 41px;
  height: 69px;
  background-image: url(../img/icon-slides.png);
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto 0;
}
/* 设置雪碧图 */
.prev-next .prev {
  left: 234px;
  background-position: -84px 0;
}
.prev-next .prev:hover {
  background-position: 0 0;
}
.prev-next .next {
  right: 0;
  background-position: -125px 0;
}
.prev-next .next:hover {
  background-position: -42px 0;
}
/* 设置回到顶部的元素 */
.back-top {
  width: 26px;
  height: 206px;
  background-color: #ff5700;
  position: fixed;
  bottom: 60px;
  right: 50% ;
  margin-right: -639px;
}
/* 设置下部广告区域 */
.ad {
  /* background-color: #ff6700; */
  height: 170px;
  margin-top: 14px;

}
.ad .shortcut,
.ad .ad-img,
.ad li {
  float: left;
}
/* 设置左边快捷键 */
.ad .shortcut {
  width: 228px;
  height: 168px;
  padding-top: 2px;
  background-color: #5f5750;
  margin-right: 14px;
  padding-left: 6px;
}
.ad .shortcut li {
  position: relative;
}
/* 设置上边块 */
.ad .shortcut li::before {
  content: '';
  position: absolute;
  width: 64px;
  height: 1px;
  background-color: #665e57;
  left: 0;
  right: 0;
  top: 0;
  margin: 0 auto;
}
/* 设置左边块 */
.ad .shortcut li::after {
  content: '';
  position: absolute;
  width: 1px;
  height: 70px;
  background-color: #665e57;
  top: 0;
  left: 0;
  bottom: 0;
  margin: auto 0;
}
.ad .shortcut a {
  /* 将链接设置成块元素 */
  display: block;
  color: #cfccca;
  height: 84px;
  width: 76px;
  text-align: center;
  font-size: 12px;
  overflow: hidden;
}
.ad .shortcut a:hover {
  color: #fff;
}
/* 设置图标字体 */
.ad .shortcut i {
  display: block;
  margin-top: 20px;
  margin-bottom: 5px;
  font-size: 22px;
}
/* 设置左侧图片 */
.ad .ad-img li {
  width: 316px;
  margin-right: 15px;
}
.ad .ad-img li:last-child {
  margin: 0;
}
.ad .ad-img img{
  width: 100%;
  vertical-align: top;
}